//
//  BulkViewController.m
//  10702
//
//  Created by student on 16/2/22.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import "BulkViewController.h"

extern int calCount;
@interface BulkViewController ()

@end

@implementation BulkViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

- (IBAction)JiSuanBtn:(id)sender {
    
    float width = [self.WidthText.text floatValue];
    float height = [self.HeightText.text floatValue];
    float length = [self.LengthText.text floatValue];
    float bulk1 = width * height * length;
    self.BulkText.text = [NSString stringWithFormat:@"%.2f",bulk1];
    
    float radius = [self.RadiusText.text floatValue];
    float bulk2 = 4/3*M_1_PI*radius*radius*radius;
    self.Bulk2Text.text = [NSString stringWithFormat:@"%.2f",bulk2];
    
    calCount++;
}
@end
